home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / Technical Docs / Apple II Technical Notes / Technical Notes (Text) / Misc / TN.Misc.007 < prev    next >
Encoding:
Text File  |  1988-12-22  |  4.4 KB  |  93 lines  |  [TEXT/pdos]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6.  
  7. Apple II Miscellaneous
  8. #7:    Apple II Family Identification
  9.  
  10. Revised by:    Matt Deatherage                                  November 1988
  11. Written by:    Cameron Birse                                    December 1986
  12.  
  13. This Technical Note describes the ROM identification bytes in the Apple II 
  14. family.
  15. _____________________________________________________________________________
  16.  
  17. To identify which computer of the Apple II family is executing your program, 
  18. you must check the following identification bytes.  These bytes are in the 
  19. main bank of main ROM (shadowed on the Apple IIGS), and you should make sure 
  20. that this bank is switched in before making decisions based on the contents of 
  21. these locations.
  22.  
  23. Machine                      $FBB3  $FB1E   $FBC0    $FBBF
  24. Apple ][                      $38           [$60]    [$2F]
  25. Apple ][+                     $EA    $AD    [$EA]    [$EA]
  26. Apple /// (emulation)         $EA    $8A
  27. Apple IIe                     $06            $EA     [$C1]
  28. Apple IIe (enhanced)          $06            $E0     [$00]
  29. Apple IIc                     $06            $00     $FF
  30. Apple IIc (3.5 ROM)           $06            $00     $00
  31. Apple IIc (Org. Mem. Exp.)    $06            $00     $03
  32. Apple IIc (Rev. Mem. Exp.)    $06            $00     $04 
  33. Apple IIc Plus                $06            $00     $05
  34. Apple IIGS    (See below)
  35.  
  36. Note:    Values listed in square brackets in the table are provided 
  37. for your reference only.  You do not need to check them to 
  38. conclusively identify an Apple II.
  39.  
  40. The ID bytes for an Apple IIGS are not listed in the table since they match 
  41. those of an enhanced Apple IIe.  Future 16-bit Apple II products may match 
  42. different Apple II identification bytes for compatibility reasons, so to 
  43. identify a machine as a IIGS or other 16-bit Apple II, you must make the 
  44. following ROM call:
  45.  
  46.     SEC                           ;Set carry bit (flag)
  47.     JSR $FE1F                     ;Call to the monitor
  48.     BCS OLDMACHINE                ;If carry is still set, then old machine
  49.     BCC NEWMACHINE                ;If carry is clear, then new machine
  50.  
  51. In all the current, standard Apple II ROMs, $FE1F contains an RTS.  In the 
  52. Apple IIGS, there is a routine that returns compatibility information in the 
  53. A, X, and Y registers:
  54.  
  55. Bit       Accumulator                            X Register  Y Register
  56. Bit 15    Reserved                               Reserved    Machine ID Number
  57.                                                              (0 = Apple IIGS)
  58. Bit 14    Reserved                               Reserved    Machine ID Number
  59. Bit 13    Reserved                               Reserved    Machine ID Number
  60. Bit 12    Reserved                               Reserved    Machine ID Number 
  61. Bit 11    Reserved                               Reserved    Machine ID Number
  62. Bit 10    Reserved                               Reserved    Machine ID Number
  63. Bit 9     Reserved                               Reserved    Machine ID Number
  64. Bit 8     Reserved                               Reserved    Machine ID Number
  65. Bit 7     Reserved                               Reserved    ROM version number
  66. Bit 6     1 if system has memory expansion slot  Reserved    ROM version number
  67. Bit 5     1 if system has IWM port               Reserved    ROM version number
  68. Bit 4     1 if system has a built-in clock       Reserved    ROM version number
  69. Bit 3     1 if system has desktop bus            Reserved    ROM version number
  70. Bit 2     1 if system has SCC built-in           Reserved    ROM version number
  71. Bit 1     1 if system has external slots         Reserved    ROM version number
  72. Bit 0     1 if system has internal ports         Reserved    ROM version number
  73.  
  74. Note:    In emulation or eight-bit mode, only the lower eight bits 
  75. are returned.
  76.  
  77. This ROM call is enough to determine if a machine is an Apple IIGS or 
  78. equivalent.
  79.  
  80. Note:    The original Apple IIGS ROM returns a faulty value in the 
  81. accumulator.  The value returned is $xx1F and should be $xx7F.  If 
  82. you see a $0000 in the Y register (i.e., Apple IIGS, ROM version 
  83. $00), you should assume that the accumulator value is $xx7F.
  84.  
  85. The current Apple IIGS ROM (ROM version $01) sets all the registers correctly 
  86. before returning from this call.
  87.  
  88.  
  89. Further Reference
  90. o    Miscellaneous Technical Note #2,
  91.           Apple II Family Identification Routines 2.1
  92.  
  93.